package ruanjian.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ruanjian.dao.UserDao;
import ruanjian.domain.User;
import ruanjian.service.UserService;

/**
 * 用户Service接口实现类
 */
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {
	// 注入UserDao
	@Autowired
	private UserDao userDao;
	// 通过账号和密码查询用户
	@Override
	public User findUser(String usercode, String password) {
		User user = getUser();
		return user;
	}

	private User getUser(){
		User user = new User();
		user.setUser_name("Li");
		user.setUser_id(1);
		user.setUser_code("123");
		user.setUser_password("123");
		user.setUser_state(1);
		return user;
	}
}
